Method for determining change in distance, location prompting method and apparatus and system thereof

ABSTRACT

A method for determining a change in a distance, a location prompting method and an apparatus and a system thereof are provided. The method includes: sending, by a receiving terminal, a paring request to a server for the server to forward the paring request to a transmitting terminal, and to allocate a frequency band for the receiving terminal and the transmitting terminal after the transmitting terminal accepts the paring request; acquiring, by the receiving terminal, an acoustic wave signal of a frequency sent by the transmitting terminal, wherein the frequency is determined by the transmitting terminal based on the allocated frequency band; determining, by the receiving terminal, a change in the acquired acoustic wave signal; and determining, by the receiving terminal, a change in a distance between the transmitting terminal and the receiving terminal according to the change in the acquired acoustic wave signal.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation application of InternationalPatent Application No. PCT/CN2017/095920, filed on Aug. 4, 2017, whichis based on and claims priority to Chinese Patent Application No.201610682482.2, entitled “METHOD FOR DETERMINING CHANGE IN DISTANCE,LOCATION PROMPTING METHOD AND APPARATUS AND SYSTEM THEREOF” and filed onAug. 17, 2016. The above-referenced applications are incorporated hereinby reference in their entirety.

TECHNICAL FIELD

This application relates to the field of positioning technologies, andin particular, to a method for determining a change in a distance, alocation prompting method and an apparatus and a system thereof.

BACKGROUND

With the development of science and technologies, positioningtechnologies are widely applied to lives of users. For example, usersoften install a location tracker in a vehicle. When a vehicle is stolen,the user may learn a location of the vehicle according to the locationtracker, thereby facilitating a search.

Currently, frequently-used positioning manners include GPS (globalpositioning system) positioning and LBS (location based service)positioning. A target is mainly located by means of the GPS positioningby using a satellite navigation system. The LBS positioning is mainlyused for users of mobile phones, and a user of a mobile terminal islocated through a wireless communications network (for example, a GSMnetwork or a CDMA network) of a telecommunications operator or a mobileoperator, or with the help of the GPS positioning, or the like.

Generally, an error of location information of a target user obtained bymeans of the GPS positioning is approximately 4 meters to 5 meters. Whenthe LBS positioning is used, with the help of the GPS positioning, anerror of obtained location information of the target user is alsoapproximately 4 meters to 5 meters. If the user uses a wirelesscommunications network of a telecommunications operator or a mobileoperator (a base station) instead of enabling a GPS function, an errorof obtained location information of the target user is approximately 100meters. Therefore, when a distance between two located users isrelatively small, a change in the distance between the two located userscannot be accurately obtained by using an existing positioningtechnology. For example, for two users at different floors in a samebuilding, location information of the two users that is obtained byusing the GPS positioning or the LBS positioning may be the same.Apparently, relative position information between the two users cannotbe obtained by using the existing positioning technology, and even thetwo users cannot find each other sometimes.

SUMMARY

In view of the foregoing problem, embodiments of this applicationprovide a method for determining a change in a distance, a locationprompting method and an apparatus and a system thereof, to resolve theproblem that when a distance between two located users is relativelysmall, a change in a distance between the two users cannot be determinedby using an existing positioning technology.

The present application provides a method for determining a change in adistance, including:

sending, by a receiving terminal, a paring request to a server for theserver to forward the paring request to a transmitting terminal, and toallocate a frequency band for the receiving terminal and thetransmitting terminal after the transmitting terminal accepts the paringrequest;

acquiring, by the receiving terminal, an acoustic wave signal of afrequency sent by the transmitting terminal, wherein the frequency isdetermined by the transmitting terminal based on the allocated frequencyband;

determining, by the receiving terminal, a change in the acquiredacoustic wave signal; and

determining, by the receiving terminal, a change in a distance betweenthe transmitting terminal and the receiving terminal according to thechange in the acquired acoustic wave signal.

In some embodiments, the determining a change in the acquired acousticwave signal includes:

determining a change in energy of the acquired acoustic wave signal; and

the determining the change in the distance between the transmittingterminal and the receiving terminal according to the change in theacquired acoustic wave signal includes: determining the change in thedistance between the transmitting terminal and the receiving terminalaccording to the change in the energy of the acquired acoustic wavesignal.

In some embodiments, the acoustic wave signal of the frequency isselected by the transmitting terminal from acoustic waves correspondingto the frequency band.

In other embodiments, the frequency band is allocated to the receivingterminal and the transmitting terminal when the server determines thatthe distance between the receiving terminal and the transmittingterminal is within the preset distance range.

In still other embodiments, another one or more frequency bands areallocated to the receiving terminal and the transmitting terminal by theserver and the acoustic wave signal of the frequency sent by thetransmitting terminal comprises acoustic waves of frequenciesrespectively corresponding to the two or more frequency bands that aresuperimposed together.

In some embodiments, after the determining a change in a distancebetween the transmitting terminal and the receiving terminal, the methodfurther includes: generating prompt information according to the changein the distance for prompting the change in the distance between thereceiving terminal and the transmitting terminal..

In other embodiments, after the generating prompt information accordingto the change in the distance, the method further includes:

sending, by the receiving terminal, the prompt information to thetransmitting terminal, to prompt the change in the distance between thereceiving terminal and the transmitting terminal.

In still other embodiments, after the generating prompt informationaccording to the change in the distance, the method further includes:

sending, by the receiving terminal, through the server, the promptinformation to the transmitting terminal, to prompt the change in thedistance between the receiving terminal and the transmitting terminal.

In yet other embodiments, a manner of prompting the change in thedistance between the receiving terminal and the transmitting terminalincludes at least one of the following:

prompting the change in the distance between the receiving terminal andthe transmitting terminal with a sound;

prompting the change in the distance between the receiving terminal andthe transmitting terminal with a picture;

prompting the change in the distance between the receiving terminal andthe transmitting terminal with an animation; and

prompting the change in the distance between the receiving terminal andthe transmitting terminal with a vibration.

In some embodiments, when the prompt information prompts the change inthe distance between the receiving terminal and the transmittingterminal with a sound, before the generating prompt informationaccording to the change in the distance, the method further includes:

establishing a correspondence between a magnitude of energy of anacoustic wave signal and a volume of the sound of the promptinformation.

The present application further provides a method for determining achange in a distance, including:

receiving, by a transmitting terminal, a paring request sent by areceiving terminal through a server;

accepting, by the transmitting terminal, the paring request;

receiving, by the transmitting terminal, a frequency band allocated bythe server;

determining, by the transmitting terminal, an acoustic wave signal of afrequency based on the frequency band allocated by the server;

sending, by the transmitting terminal, the acoustic wave signal of thefrequency to the receiving terminal;

receiving, by the transmitting terminal, information of the acousticwave signal returned by the receiving terminal after acquiring theacoustic wave signal;

determining, by the transmitting terminal, a change in the acoustic wavesignal according to the information of the acoustic wave signal; and

determining, by the transmitting terminal, a change in a distancebetween the receiving terminal and the transmitting terminal accordingto the change in the acoustic wave signal.

In some embodiments, the determining a change in the acoustic wavesignal according to the information of the acoustic wave signalincludes:

determining a change in energy of the acoustic wave signal according tothe information of the acoustic wave signal; and

the determining the change in the distance between the receivingterminal and the transmitting terminal according to the change in theacoustic wave signal includes:

determining the change in the distance between the transmitting terminaland the receiving terminal according to the change in the energy of theacoustic wave signal.

In other embodiments, the receiving, by the transmitting terminal,information of the acoustic wave signal returned by the receivingterminal includes: receiving, by the transmitting terminal, theinformation on the energy of the acoustic wave signal via the server.

This application further provides an apparatus for determining a changein a distance. The apparatus is located in a receiving terminal,comprising: one or more processors and one or more non-transitorycomputer-readable memories coupled to the one or more processors andconfigured with instructions executable by the one or more processors tocause the apparatus to perform operations comprising:

sending a paring request to a server for the server to forward theparing request to a transmitting terminal, and to allocate a frequencyband for the receiving terminal and the transmitting terminal after thetransmitting terminal accepts the paring request;

acquiring the acoustic wave signal of the frequency sent by thetransmitting terminal, wherein a frequency is determined by thetransmitting terminal based on the allocated frequency band;

determining a change in the acquired acoustic wave signal; and

determining a change in a distance between the transmitting terminal andthe receiving terminal according to the change in the acquired acousticwave signal.

The method provided in this application mainly depends on sending andreceiving of the acoustic wave signal between the transmitting terminaland the receiving terminal. The change in the distance between thetransmitting terminal and the receiving terminal is determined accordingto the received acoustic wave signal. Compared with positioning methodsin the existing technologies, according to the method for determining achange in a distance provided in this application, when the distancebetween locations of the transmitting terminal and the receivingterminal is relatively small, a change in a distance between the twoterminals also can be determined. In this application, correspondingprompt information may further be generated according to the change inthe distance between the two terminals. The prompt information is usedto prompt a user about the change in the distance between the twoterminals, and guide the user to move in a direction in which a distancebetween the two terminals is reduced. Compared with the existingpositioning technologies, when a distance between two located users isrelatively small, a chance of the users finding each other is increasedby using the method provided in this application.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings herein are provided for further understandingof this application, and constitute a part of this application.Embodiments and explanations thereof in this application are used toexplain this application, but do not constitute an unsuitable limitationto this application. In the accompanying drawings:

FIG. 1 is a schematic flowchart of a method for determining a change ina distance according to an embodiment of this application;

FIG. 2 is a schematic diagram of transmission of an acoustic wave signalbetween a receiving terminal and a transmitting terminal according to anembodiment of this application;

FIG. 3 is a schematic flowchart of a method for pairing of a clientaccording to an embodiment of this application;

FIG. 4 is a schematic diagram of a method for pairing of a clientaccording to an embodiment of this application;

FIG. 5 is a schematic diagram of an acoustic wave sent by a transmittingterminal to a receiving terminal according to an embodiment of thisapplication;

FIG. 6 is a schematic flowchart of a location prompting method accordingto an embodiment of this application;

FIG. 7 is a schematic diagram of a positioning method provided in theexisting technologies;

FIG. 8 is a schematic structural diagram of an apparatus for determininga change in a distance according to an embodiment of this application;

FIG. 9 is a schematic structural diagram of an apparatus for determininga change in a distance according to an embodiment of this application;

FIG. 10 is a schematic structural diagram of a location promptingapparatus according to an embodiment of this application; and

FIG. 11 is a schematic structural diagram of a system for determining achange in a distance according to an embodiment of this application.

DETAILED DESCRIPTION OF THE APPLICATION

It has been mentioned in the background that currently, frequently-usedpositioning manners include GPS positioning and LBS positioning. For theGPS positioning, an error is usually 4 meters to 5 meters. Many reasonsresult in the error. For example, an error of a satellite ephemerisresults in an error of obtained location information of a target. Whenthe target is located by using a GPS positioning technology, locationinformation of several satellites participating in the GPS positioningneeds to be calculated. Thus, orbit parameters corresponding to the GPSsatellites at a time need to be learned, and the parameters are providedby ephemerides of various types. However, whichever type of ephemeris ofa satellite is used to calculate the location information of thesatellites, the calculated location information is different from actuallocation information of the satellites. As a result, an error alsooccurs to the location information of the target obtained by means ofGPS positioning. For another example, an error also exists between atime on a satellite and a standard time. The time on the satellite isusually faster than the time on the Earth. Accordingly, obtainedlocation information of a target has an error. A signal transmissionpath may also results in an error. Because a transmission medium is noteven in a process in which a signal is transmitted from a satellite tothe Earth, or even a type of the medium may also vary, a transmissionspeed of the signal is not fixed. However, during calculation oflocation information of a target, this problem is usually ignored, andby default, the transmission speed is the same. Even if this problem isconsidered, an error caused by this problem is only avoided as much aspossible, but the error cannot be eliminated completely. Certainly,factors also result in an error during the GPS positioning. This is notdescribed herein.

For the LBS positioning, generally, the GPS positioning is preferablyused to measure location information of a target, and then the target islocated according to the location information. Therefore, an error ofthe measured location information of the target is also 4 meters to 5meters. However, if a wireless communications network of atelecommunications operator or a mobile operator (base station) is usedwithout the help of the GPS positioning, an error of obtained locationinformation of the target is approximately 100 meters. For the LBSpositioning, there are also many reasons resulting in an error. Forexample, a base station density and signal interference both affectprecision of the LBS positioning.

As may be learned above, when the two located users are quite far fromeach other, the users may learn location information of each other byusing a current GPS positioning or LBS positioning technology. However,when a distance between the two located users is relatively small, dueto a measurement error of the GPS positioning or the LBS, the twolocated users cannot learn relative location information of each othersometimes. In addition, regardless of the GPS positioning or the LBSpositioning, location information of a target that is usually measuredis location information under a latitude and longitude coordinatesystem. Therefore, if the two located users are located on differentfloors in a same building and the two floors are located on the samelatitude, then location information of the two users that is obtained byusing an existing positioning technology may be the same. Apparently,the two users cannot find each other by using the existing positioningtechnology.

In view of the foregoing problem, this application provides a method fordetermining a change in a distance, a location prompting method and anapparatus and a system thereof. To make the objectives, technicalsolutions, and advantages of this application clearer, the followingdescribes the technical solutions of this application in detail withreference to embodiments of this application and the correspondingaccompanying drawings. Apparently, the described embodiments are merelysome rather than all of the embodiments of this application. All otherembodiments obtained by a person of ordinary skill in the art based onthe embodiments of this application without creative efforts shall fallwithin the protection scope of this application.

The following describes the technical solution provided in eachembodiment of this application in detail with reference to theaccompanying drawings.

Embodiment 1

This embodiment of this application provides a method for determining achange in a distance, to resolve a problem that when a distance betweentwo located users is relatively small, a change in the distance betweenthe two users cannot be determined by using an existing positioningtechnology. A schematic flowchart of the method is shown in FIG. 1, andthe method includes the following steps.

Step 11: A receiving terminal acquires an acoustic wave signal of apreset frequency sent by a transmitting terminal.

In this step, a frequency of the acoustic wave signal sent by thetransmitting terminal is the preset frequency. The frequency may be afrequency allocated by a system to the transmitting terminal and thereceiving terminal when the transmitting terminal receives a request forsending the acoustic wave signal, where the request includes informationof the receiving terminal. Alternatively, the frequency may be afrequency specified by the transmitting terminal and the receivingterminal in advance after a pairing relationship is established. For aservice of a same transmitting terminal and receiving terminal, after afrequency of acoustic wave signals is determined, before the service iscompleted, the transmitting terminal sends only acoustic wave signalssatisfying the preset frequency, and the receiving terminal acquiresonly acoustic wave signals satisfying the preset frequency, or thereceiving terminal only analyzes acoustic wave signals satisfying thepreset frequency in acquired acoustic wave signals.

The request for sending the acoustic wave signal sent by thetransmitting terminal may be triggered by a user of the transmittingterminal on the transmitting terminal; or may be triggered by thetransmitting terminal receiving an instruction from the receivingterminal. In some embodiments, on the receiving terminal, acorresponding instruction is sent to the transmitting terminal after auser of the receiving terminal performs triggering. That the receivingterminal may trigger the instruction has been authorized by thetransmitting terminal, and the receiving terminal acquires the acousticwave signal of the preset frequency sent by the transmitting terminal.In an implementation, before the receiving terminal acquires theacoustic wave signal of the preset frequency sent by the transmittingterminal, a pairing relationship may be established between thereceiving terminal (a client) and the transmitting terminal (a client).

After the pairing relationship is established between the transmittingterminal and the receiving terminal, a server may allocate a frequencyband of acoustic waves to the two paired clients. After the serverallocates the frequency band of the acoustic waves to the two clients,the transmitting terminal sends the acoustic wave signal of the presetfrequency to the receiving terminal.

The transmitting terminal herein may send the acoustic wave signal tothe receiving terminal at a fixed period, for example, sending theacoustic wave signal to the receiving terminal once per minute, orsending the acoustic wave signal once per five seconds, etc.Alternatively, the transmitting terminal may not send the acoustic wavesignal to the receiving terminal at a fixed period, for example, sendingthe acoustic wave signal only for ten times or five times within oneminute. A manner in which the transmitting terminal sends the acousticwave signal is not limited herein.

Step 12: Determine a change in a distance between the transmittingterminal and the receiving terminal according to the acquired acousticwave signal.

In this step, a method for determining the change in the distancebetween the transmitting terminal and the receiving terminal by thereceiving terminal according to the acquired acoustic wave signals maybe: first, the receiving terminal determining a change in the acousticwave according to the acquired acoustic wave signal, and thendetermining the change in the distance between the transmitting terminaland the receiving terminal according to the change in the acoustic wave.

The change in the acoustic wave may be a change in frequency, wavelength, amplitude, or energy of the acoustic wave, or the like, acquiredat two consecutive times, where the change is determined by thereceiving terminal according to the received acoustic wave signal thatis sent by the transmitting terminal.

To clearly describe this application, an example of determining “achange in energy of the acoustic wave” is used below to describe thisembodiment of this application, merely provides example description, anddoes not constitute a limitation to this application.

After acquiring the acoustic wave signal, the receiving terminaldetermines the change in the distance between the transmitting terminaland the receiving terminal according to a change in energy of anacoustic wave corresponding to the received acoustic wave signal. Anapplication principle herein is: when a wave source emits an acousticwave, the acoustic wave transmits in all directions, and usuallytransmits in a spherical form. As shown in FIG. 2, the transmittingterminal is used as a wave source “O” and sends an acoustic wave signalto the receiving terminal. The acoustic wave signal transmits from nearto far in all directions in a spherical form. It is assumed that in anideal situation, even if there is no energy loss, energy of the acousticwave is constant when the acoustic wave transmits to a point A, a pointB, and a point C. However, a radius of a transmitted sphere becomesincreasingly large. Therefore, the area of the corresponding transmittedsphere becomes increasingly large. Accordingly, energy distributed onper unit of area becomes increasingly small. That is, a distance betweenthe transmitting terminal and the receiving terminal becomesincreasingly large, and energy of the acoustic wave received by thereceiving terminal becomes increasingly small. As shown in FIG. 2, whenthe receiving terminal is located at the point A, point B, and point Cin sequence, energy of the received acoustic wave signal becomesincreasingly small.

In addition, the acoustic wave does not usually transmit in the idealsituation, that is, energy loss exists. For example, when the acousticwave encounters an obstacle, the acoustic wave transmits in the obstacleinstead of circumventing the obstacle sometimes. Therefore, the acousticwave is used as a vibrating mechanical wave and has friction withmolecules in the obstacle, converting a part of energy of the acousticwave into thermal energy. For another example, substances such as solidparticles and suspended particles usually exist in air. These substancesand the acoustic wave interact between each other, consuming a part ofthe energy of the acoustic wave. In addition, when the distance betweenthe receiving terminal and the transmitting terminal is larger, energyloss is more serious. Therefore, when the distance between the twoclients is smaller, energy corresponding to the acoustic wave receivedby the receiving terminal is larger. Otherwise, energy corresponding tothe acoustic wave received by the receiving terminal is smaller.

The receiving terminal determines the change in the distance between thetransmitting terminal and the receiving terminal according to a changein energy of acoustic waves corresponding to an acoustic wave signalacquired consecutively. A process may be: the receiving terminalcompares energy corresponding to the acoustic wave signal sent bytransmitting terminal that is acquired at two consecutive times; and ifthe energy of the acoustic wave signal acquired at the latter of the twotimes is greater than the energy of the acoustic wave signal acquired atthe former of the two times, according to the foregoing transmissionprinciple of the acoustic wave, it may be learned that the distancebetween the receiving terminal and the transmitting terminal is reduced.Thus, it indicates that the path along which the receiving terminal andthe transmitting terminal find each other is correct.

If the energy of the acoustic wave signal acquired at the latter of thetwo times is less than the energy of the acoustic wave signal acquiredat the former of the two times, it may be determined that the distancebetween the receiving terminal and the receiving terminal is increased,which indicates that for the path along which the receiving terminal andthe transmitting terminal find each other is incorrect.

Step 13: Generate prompt information according to the change in thedistance, where the prompt information is used to prompt the change inthe distance between the receiving terminal and the transmittingterminal.

In this embodiment of this application, after determining the change inthe distance between the transmitting terminal and the receivingterminal according to the change in received acoustic wave, thereceiving terminal may further generate the corresponding promptinformation according to the change in the distance. The promptinformation is used to prompt a user about the change in the distancebetween the transmitting terminal and the receiving terminal. Forexample, when determining a distance from the transmitting terminal isreduced, the receiving terminal generates prompt information. The promptinformation prompts that a location at which the user is current locatedis closer to a location of a target user.

The prompt information is presented in many forms. For example, theprompt information may prompt the user about the change in the distancebetween the receiving terminal and the transmitting terminal in a formsuch as sound, text, animation, vibration, or a combination thereof. Forexample, the prompt information may be presented by using voice andvibration or using voice and animation.

If the prompt information prompts the user about the change in thedistance between the transmitting terminal and the receiving terminal ina sound manner, before the prompt information is generated, acorrespondence may further be established between a magnitude of energyof an acoustic wave corresponding to an acoustic wave signal and avolume of a prompt sound. For example, a larger distance between thereceiving terminal and the transmitting terminal indicates a highervolume of the prompt sound, to prompt the user about an incorrectdirection in which a target is searched for. Accordingly, the user mayadjust the direction according to the prompt information in a timelymanner.

There are many methods for establishing a correspondence between amagnitude of energy of an acoustic wave corresponding to an acousticwave signal and a volume of a prompt sound, and may be a larger distancebetween the two clients indicating a higher volume of the prompt soundin the foregoing example, or may be a smaller distance between the twoclients indicating a higher volume of the prompt sound, or the like.This is not limited herein.

A user holding the receiving terminal searches for a location of thetransmitting terminal according to the generated prompt information. Forexample, in a process of searching for the transmitting terminal by theuser, when the prompt information of the receiving terminal prompts thata distance between the user and the transmitting terminal is decreasing,the user can continue searching for the transmitting terminal accordingto a current search direction, thereby increasing search efficiency.

To describe this embodiment of this application more clearly, thefollowing describes the foregoing steps in detail.

In step 11, there are many manners in which a pairing relationship isestablished between the receiving terminal and the transmittingterminal. The following describes an example of implementation:

As shown in FIG. 3, if the receiving terminal intends to establish apairing relationship with the transmitting terminal, steps for pairingare as follows:

Step 31: A user A sends a request for pairing with the transmittingterminal to a server by using the receiving terminal.

Step 32: After receiving the request, the server sends the request to auser B holding the transmitting terminal.

Step 33: After the user B accepts the request, the receiving terminal issuccessfully paired with the transmitting terminal.

FIG. 4 is a schematic diagram of pairing of the receiving terminal withthe transmitting terminal. When the user A sends the request for pairingwith the transmitting terminal to the server by using the receivingterminal, the transmitting terminal held by the user B displays: acceptor refuse the pairing request of the receiving terminal. After the userB selects to accept the pairing request, the pairing relationship issuccessfully established between the receiving terminal and thetransmitting terminal.

After the receiving terminal is successfully paired with thetransmitting terminal, the transmitting terminal may further send apairing result to the server (step 34). In this way, when the serverlearns that the receiving terminal is successfully paired with thetransmitting terminal, the server allocates a frequency band of acousticwaves to the two clients.

After receiving the pairing result sent by the transmitting terminal,the server may further feedback the pairing result to the receivingterminal (step 35).

There are also many methods for sending the pairing request by theclient to the server. For example, the client and the server both have aunique identifier of each other. In a process of sending the pairingrequest to the server, the identifiers of objects to be paired are alsosent to the server. The server establishes, according to the pairingrequest, a pairing relationship between two parties requiring pairing.The unique identifier herein may be a login account of software, or maybe identifiers of devices used by the two parties to be paired, or thelike.

After the pairing relationship is established between the receivingterminal and the transmitting terminal, the server allocates a frequencyband of acoustic waves to the receiving terminal and the transmittingterminal. The server allocates the frequency band of acoustic waves tothe two clients instead of a fixed frequency. A reason is that: in atransmission process of the acoustic wave, the frequency is notconstant, and is affected by many factors. For example, the acousticwave is affected by a transmission medium, weather, an obstacle, and thelike. Therefore, after the receiving terminal emits an acoustic wave ofa fixed frequency, a frequency of the acoustic wave received by thetransmitting terminal usually changes. Therefore, the server hereinallocates the frequency band of acoustic waves to the two clients. Forexample, the frequency band of acoustic waves allocated by the serverranges from 20000 HZ to 20005 HZ.

To prevent the two clients from generating noise in a process of sendingthe acoustic wave, the frequency band of acoustic waves allocated by theserver in this step may be a frequency band inaudible to human ears. Afrequency of acoustic waves audible to human ears usually ranges from 20HZ to 20000 HZ. An acoustic wave of a frequency less than 20 HZ orgreater than 20000 HZ is inaudible to human ears. Therefore, a frequencyband less than 20 HZ or a frequency band greater than 20000 HZ may beselected. However, when the transmitting terminal selects to send anacoustic wave of a relatively small frequency, the receiving terminalmay not receive the acoustic wave. Even if the receiving terminalreceives the acoustic wave, the frequency of the acoustic wave has beenalso significantly affected.

After the server allocates the frequency band of acoustic waves to thereceiving terminal and the transmitting terminal, the transmittingterminal sends the acoustic wave signal of the preset frequency to thereceiving terminal. The preset frequency is within the frequency bandallocated by the server. The receiving terminal acquires the acousticwave signal of the preset frequency sent by the transmitting terminal.

During actual applications, generally, many clients complete pairing ata same time. That is, many clients transmit acoustic waves at a sametime. Therefore, to avoid interference among the acoustic wave signals,the server should allocate different frequency bands to each pair ofpaired clients within a small range. In this way, it may be ensured thatan acoustic wave received by a client is sent by a paired client.

A reason for emphasizing the “small range” above is that: a frequencyband of available acoustic waves is generally limited, and a largequantity of client pairs may send the acoustic waves at a same time.Accordingly, the server cannot allocate a different frequency band toeach pair of the large quantity of client pairs. Therefore, the servermay allocate different frequency bands to each pair of paired clientswithin the small range. Beyond the range, the server may simultaneouslyallocate the same frequency bands to other paired clients.

There are many methods for determining whether the two clients arewithin a range preset by the server. For example, location informationof the two clients may be obtained by means of LBS positioning or GPSpositioning. The server determines whether the clients are within thepreset range according to the location information. When a distancebetween the two clients is relatively small, a situation described inthe background may occur that measured location information of the twoclients may be the same due to an error of positioning by means of theexisting technologies. However, this does not affect determining whetherthe two clients are within the preset range by the server. When learningthat the location information of the two clients obtained by means ofthe LBS positioning or the GPS positioning is the same, the server mayconsider by default that the two clients are relatively close to eachother. That is, it considers that the two clients are within the presetrange.

When a quantity of paired clients within a small range reaches an upperlimit of the quantity of allocated frequency bands, there are notsufficient frequency bands. Accordingly, the server first allocatesfrequency bands to only paired clients “queuing” at the front. After apair of clients completes the use of a frequency band, the server mayallocate the frequency band to another pair of clients that are“queuing.”

In addition, in a process in which the receiving terminal acquires theacoustic wave sent by the transmitting terminal, the receiving terminalcan simultaneously acquire acoustic wave signals of multiplefrequencies. However, the receiving terminal “pays attention to” onlythe acoustic wave in the frequency band allocated by the server. It hasbeen mentioned above that the frequency of the acoustic wave signalchanges in the transmission process, and the acoustic wave signalsuffers interference from other acoustic wave signals. This may causetrouble to the receiving terminal receiving the signal sometimes, andwhether the acquired acoustic wave is sent by a paired transmittingterminal is not determined.

This application provides two methods to resolve the problem, and themethods are as follows:

A first method: When the transmitting terminal sends the acoustic wavesignal to the receiving terminal, the acoustic wave signal may includeunique identifier information of the transmitting terminal. When thereceiving terminal acquires a relatively large quantity of acoustic wavesignals, the receiving terminal may recognize identification informationof the acoustic wave signals to find the acoustic wave signal sent bythe paired transmitting terminal.

A second method: The server may allocate two or more frequency bands tothe two clients. The transmitting terminal may select an acoustic waveof a frequency respectively from the two or more frequency bands andsuperimpose the acoustic waves to obtain a new acoustic wave signal, anduse the acoustic wave signal as the acoustic wave signal of the presetfrequency. In this way, after the receiving terminal acquires thesuperimposed acoustic wave, conditions for verifying whether theacoustic wave is sent by the transmitting terminal are correspondinglyincreased. For example, if the acoustic wave acquired by the receivingterminal is the superimposed acoustic wave, it is to verify whether theacoustic wave satisfies both two preset frequencies. Apparently,compared with an acoustic wave of a frequency, the receiving terminalcan more accurately determine whether an object sending the acousticwave is the paired transmitting terminal after acquiring thesuperimposed acoustic wave.

FIG. 5 shows a diagram of an acoustic wave. The transmitting terminalmay send an acoustic wave of a frequency A to the receiving terminal, orsend an acoustic wave of a frequency B to the receiving terminal, orsend, to the receiving terminal, an acoustic wave that is obtained afteran acoustic wave of a frequency A and an acoustic wave of a frequency Bare superimposed.

With regard to a method for determining “the preset frequency” by thetransmitting terminal, in addition to the method described above, thatis, a fixed frequency is selected from the frequency band allocated bythe server and is used as “the preset frequency,” there are also manymethods. For example, before the transmitting terminal sends theacoustic wave signal of the preset frequency to the receiving terminal,the receiving terminal and the transmitting terminal specify a frequencyfor transmission of the acoustic wave signal in advance, and use thefrequency as “the preset frequency.”

In some embodiments, the transmitting terminal “informs” the receivingterminal of a frequency of a to-be-sent acoustic wave signal. This maybe that the transmitting terminal directly sends the frequency of theto-be-sent acoustic wave signal to the receiving terminal, or thetransmitting terminal first sends the frequency of the to-be-sent theacoustic wave signal to the server, and then the server sends thefrequency to the receiving terminal, or the like.

In step 12, in addition to determining the change in the distancebetween the receiving terminal and the transmitting terminal accordingto a change in the received energy of the acoustic wave, the receivingterminal may further determine whether the transmitting terminal is nearthe receiving terminal according to the received energy of the acousticwave. In some embodiments, a threshold of the energy of the acousticwave may be determined first. There are many methods for determining theenergy threshold. For example, the smallest value of energy of acousticwave that may be received by the two clients within a preset range maybe obtained through many tests, and the smallest value is used as theenergy threshold. If energy of an acoustic wave acquired by thereceiving terminal is less than the energy threshold, it is consideredthat a distance between the two clients is beyond the preset range. Thatis, the transmitting terminal is not near the receiving terminal. Ifenergy of an acoustic wave acquired by the receiving terminal is greaterthan the energy threshold, it is considered that the transmittingterminal is near the receiving terminal.

In step 13, the receiving terminal may search for the transmittingterminal according to the prompt information, and the transmittingterminal may also search for the receiving terminal according to theprompt information.

There are also many manners in which the transmitting terminal searchesfor the receiving terminal according to the prompt information. Thefollowing describes four examples of implementations:

In a first implementation, after generating the prompt information, thereceiving terminal directly sends the prompt information to thetransmitting terminal, to prompt a user holding the transmittingterminal about the change in the distance between the transmittingterminal and the receiving terminal.

In a second implementation, after generating the prompt information, thereceiving terminal first sends the prompt information to the server, andthen the server sends the prompt information to the transmittingterminal.

In a third implementation, the transmitting terminal may also generatethe prompt information according to the energy of the acoustic wavesignal. A method may be: after the receiving terminal acquires theacoustic wave signal sent by the transmitting terminal, the transmittingterminal receives information of the acoustic wave signal returned bythe receiving terminal. The information may be a frequency, a wavelength, energy, an amplitude, or the like of the acoustic wave signal.“Energy” is still used as an example below, to describe a process inwhich the transmitting terminal generates the prompt information. Aprocess is shown in FIG. 6.

Step 61: After acquiring the acoustic wave signal of the presetfrequency sent by the transmitting terminal, the receiving terminalobtains energy of an acoustic wave corresponding to the acoustic wavesignal by means of analysis, and the receiving terminal sends the energyof the acoustic wave corresponding to the acoustic wave signal to theserver.

Step 62: The server sends the energy of the acoustic wave correspondingto the acoustic wave signal to the transmitting terminal.

Step 63: The transmitting terminal determines a change in a distancefrom the receiving terminal according to a change in the received energyof the acoustic wave signal.

A determining method is the same as or similar to the method fordetermining a distance from the transmitting terminal by the receivingterminal according to the change in the energy of the acoustic wavesignal. Details are not described herein again.

Step 64: Generate prompt information according to the change in thedistance. The prompt information is used to prompt the change in thedistance between the user B and the user A. For example, the promptinformation displays “the receiving terminal is closer to you.”Therefore, the user B learns that a direction in which the user Bsearches for the user A is correct, and can continue following thedirection to search for the user A.

It has been mentioned above that as shown in FIG. 6, the receivingterminal determines a change in a distance from the receiving terminalaccording to the change in energy of the received acoustic wave signal(step 65). Finally, the receiving terminal generates prompt informationaccording to the change in the distance (step 66). The promptinformation is used to prompt the change in the distance between theuser A and the user B. For example, the prompt information displays “thetransmitting terminal is closer to you.” Therefore, the user A learnsthat a direction in which the user A searches for the user B is correct,and can continue following the direction to search for the user B.

In some embodiments, step 65 and step 61 are performed by the receivingterminal according to an actual sequence. For example, to enable thereceiving terminal and the transmitting terminal to acquire the promptinformation as synchronously as possible, the receiving terminal mayperform step 61 before performing step 65, or may simultaneously performstep 61 and step 65, or the like.

In a fourth implementation, first, after acquiring the acoustic wavesignal of the preset frequency sent by the transmitting terminal, thereceiving terminal obtains energy of an acoustic wave corresponding tothe acoustic wave signal by means of analysis, and directly sends theenergy of the acoustic wave to the transmitting terminal. Next, thetransmitting terminal determines the change in the distance between thereceiving terminal and the transmitting terminal according to a changein the received energy of the acoustic wave. Finally, the transmittingterminal generates the prompt information according to the change in thedistance, and searches for the receiving terminal according to theprompt information.

For the foregoing four manners in which the transmitting terminalsearches for the receiving terminal according to the prompt information,in the first manner and the second manner, the transmitting terminalsearches for the receiving terminal according to the prompt informationgenerated by the receiving terminal. In the third manner and the fourthmanner, the transmitting terminal finally generates the promptinformation according to analysis performed on the energy of theacoustic wave sent by the receiving terminal, and searches for thereceiving terminal according to the prompt information. As can belearned, in the first manner and the second manner, the transmittingterminal does not need to analyze the energy of the acoustic wave.Compared with the third manner and the fourth manner, resourceconsumption of the clients is reduced.

However, in the first manner and the second manner, the transmittingterminal obtains the prompt information after the receiving terminalgenerates the prompt information. In this way, a time at which thetransmitting terminal obtains the prompt information is later than atime at which the receiving terminal obtains the prompt information.This may cause trouble to the two located users sometimes. In the thirdmanner and the fourth manner, after obtaining the energy of the acousticwave signal, the receiving terminal may first send the energy of theacoustic wave to the transmitting terminal. Then the receiving terminaland the transmitting terminal may synchronously analyze the energy ofthe acoustic wave signal, to enable the receiving terminal and thetransmitting terminal to obtain the prompt information as simultaneouslyas possible. However, in the third manner and the fourth manner, thetransmitting terminal analyzes the acoustic wave signal. Compared withthe first manner and the second manner, the clients consume moreresources.

In some embodiments, in a location prompting method provided in thisapplication, in the two located clients, one client may be used as atransmitting terminal of an acoustic wave signal and the other clientmay be used as a receiving terminal of the acoustic wave signal.Alternatively, each of the two located clients is both a transmittingterminal of an acoustic wave signal and a receiving terminal of anacoustic wave signal.

In some embodiments, two clients each send an acoustic wave signal of apreset frequency to each other. Then the two clients respectivelyanalyze energy of the received acoustic wave signal to determine achange in a distance between the two clients, and generate promptinformation according to the change in the distance. A method for eachclient to obtain the prompt information according to the energy of thereceived acoustic wave signal is the same as the foregoing method. Toavoid repetitions, a process is not described in detail herein.

At least one technical solution used in this embodiment of thisapplication can achieve the following beneficial effects:

The method provided in this application mainly depends on sending andreceiving of the acoustic wave signal between the transmitting terminaland the receiving terminal. The change in the distance between thetransmitting terminal and the receiving terminal is determined accordingto the change in received acoustic wave signal. Compared withpositioning methods in the existing technologies, according to themethod for determining a change in a distance provided in thisapplication, when the distance between locations of the transmittingterminal and the receiving terminal is relatively small, a change in adistance between the two terminals also can be determined. In thisapplication, corresponding prompt information may further be generatedaccording to the change in the distance between the two terminals. Theprompt information is used to prompt a user about the change in thedistance between the two terminals, and guide the user to move in adirection in which a distance between the two terminals is reduced.Compared with the existing positioning technologies, when a distancebetween two located users is relatively small, a chance of the usersfinding each other is increased by using the method provided in thisapplication.

Moreover, when two users who have never met intend to meet each other,the two users can be guided to a relatively small range by using anexisting positioning technology. However, the two users have never meetand do not know facial features of each other, thus, even if the twousers are within a relatively small range, it may be still quitedifficult for the two users to find each other sometimes. By applyingembodiments of this application, when the two unfamiliar users are closeto each other, energy of the acoustic wave transmitted by twocorresponding clients is quite high. Accordingly, the users easily lockan object to be met according to prompt information generated by theclients, thereby improving user experience.

In addition, besides the LBS positioning and the GPS positioning, theexisting positioning technologies further include an ultrasonicpositioning method. The positioning method is shown in FIG. 7: When thetransmitting terminal is located at a position A, the transmittingterminal sends an ultrasonic signal to the receiving terminal. When theultrasonic signal is transmitted to the receiving terminal, reflectionof the signal occurs, and the signal is reflected to the transmittingterminal. It is assumed that the transmitting terminal is located at aposition B in this case. According to a transmission speed of theultrasonic signal and a time used by the transmitting terminal toreceive the ultrasonic signal, a distance between the receiving terminaland the transmitting terminal is calculated.

It may be learned from the foregoing existing ultrasonic positioningmethod that the location prompting method provided in this applicationis that a client emits an acoustic wave signal and the other clientreceives the acoustic wave signal, but the foregoing existing ultrasonicpositioning method is that the same client emits and receives anultrasonic signal. As can be learned, a user may obtain locationinformation of a target more rapidly by using the method provided inthis application. For the existing ultrasonic positioning method, anultrasonic wave needs to be emitted, and location information of atarget cannot be obtained until analysis is performed after theultrasonic wave is reflected to the transmitting terminal. However, inthe method provided in this application, the acoustic wave signal isemitted, and analysis can be performed immediately when the receivingterminal acquires information of the acoustic wave, to obtain thelocation information of the target. Therefore, the location promptingmethod provided this application can help a user to find the target moreeffectively.

During actual applications, the method provided in this application maybe used in combination with an existing LBS positioning technology. Whena distance between two terminals is relatively large, a change in adistance between the two terminals is reflected by means of LBSpositioning. When a distance between the two terminals is within apreset range, a change in a distance between the two terminals isreflected by means of acoustic positioning. When network environment ispoor, the user also can find the target more effectively.

Embodiment 2

Embodiment 1 provides a method for determining a change in a distance.Correspondingly, this application further provides an apparatus fordetermining a change in a distance, also to resolve a problem that whena distance between two located users is relatively small, a change in adistance between the two users cannot be determined by using existingpositioning technologies. The apparatus is located in a receivingterminal. A structure is shown in FIG. 8, and the apparatus includes thefollowing units:

a first acquiring unit 81 and a first determining unit 82, where

the first acquiring unit 81 is configured to acquire an acoustic wavesignal of a preset frequency sent by a transmitting terminal; and

the first determining unit 82 is configured to determine a change in adistance between the transmitting terminal and the receiving terminalaccording to the acquired acoustic wave signal.

A working process of the apparatus is: first, the first acquiring unit81 acquires the acoustic wave signal of the preset frequency sent by thetransmitting terminal. Next, the first determining unit 82 determinesthe change in the distance between the transmitting terminal and thereceiving terminal according to the acquired acoustic wave signal.

This application further provides a method for determining a change in adistance, also to resolve a problem that when a distance between twolocated users is relatively small, a change in a distance between thetwo users cannot be determined by using existing positioningtechnologies. The apparatus is located in a transmitting terminal. Astructure is shown in FIG. 9, and the apparatus includes the followingunits:

a sending unit 91, a receiving unit 92, and a second determining unit93, where

the sending unit 91 is configured to send an acoustic wave signal of apreset frequency to a receiving terminal;

the receiving unit 92 is configured to receive information of theacoustic wave signal returned by the receiving terminal after acquiringthe acoustic wave signal; and

the second determining unit 93 is configured to determine a change in adistance between the receiving terminal and the transmitting terminalaccording to the information of the acoustic wave signal.

A working process of the apparatus is: first, the sending unit 91 sendsthe acoustic wave signal of the preset frequency to the receivingterminal. Next, after the receiving terminal acquires the acoustic wavesignal, the receiving unit 92 receives the information of the acousticwave signal returned by the receiving terminal. Finally, the seconddetermining unit 93 determines the change in the distance between thereceiving terminal and the transmitting terminal according to theinformation of the acoustic wave signal.

Correspondingly, this embodiment of this application further provides alocation prompting apparatus, to resolve a problem that when a distancebetween two located users is relatively small, the two users cannot findeach other by using existing positioning technologies. The apparatus islocated in a receiving terminal. A structure is shown in FIG. 10, andthe apparatus includes the following units:

a second acquiring unit 101, a third determining unit 102, and a thirdgenerating unit 103, where

the second acquiring unit 101 is configured to acquire an acoustic wavesignal of a preset frequency sent by a transmitting terminal;

the third determining unit 102 is configured to determine a change in adistance between the transmitting terminal and the receiving terminalaccording to the acquired acoustic wave signal; and

the third generating unit 103 is configured to generate promptinformation according to the change in the distance, where the promptinformation is used to prompt the change in the distance between thereceiving terminal and the transmitting terminal.

A working process of the apparatus is: first, the second acquiring unit101 acquires the acoustic wave signal of the preset frequency sent bythe transmitting terminal. Next, the third determining unit 102determines the change in the distance between the transmitting terminaland the receiving terminal according to the acquired acoustic wavesignal. Finally, the third generating unit 103 generates the promptinformation according to the change in the distance. The promptinformation is used to prompt the change in the distance between thereceiving terminal and the transmitting terminal.

Beneficial effects obtained by applying the apparatus embodimentprovided in this application are the same as or similar to thebeneficial effects obtained by applying the foregoing method embodiment.To avoid repetitions, details are not described herein again.

Embodiment 3

Correspondingly, this application further provides a system fordetermining a change in a distance, also to resolve a problem that whena distance between two located users is relatively small, a change in adistance between the two users cannot be determined by using existingpositioning technologies. A schematic structural diagram of the systemis shown in FIG. 11, and the system includes:

a server 111, a receiving terminal 112, and a transmitting terminal 113,where:

the server 111 is configured to: after a pairing relationship isestablished between the receiving terminal and the transmittingterminal, allocate a frequency band of acoustic waves to the receivingterminal and the transmitting terminal; after the receiving terminalacquires an acoustic wave signal of a preset frequency sent by thetransmitting terminal, receive information of the acoustic wave signalof the preset frequency sent by the receiving terminal, where the presetfrequency is within the frequency band; and send the information of theacoustic wave signal to the transmitting terminal;

the receiving terminal 112 is configured to: acquire the acoustic wavesignal of the preset frequency sent by the transmitting terminal; anddetermine a change in a distance between the transmitting terminal andthe receiving terminal according to the acquired acoustic wave signal;and

the transmitting terminal 113 is configured to: send the acoustic wavesignal of the preset frequency to the receiving terminal; after thereceiving terminal sends the information of the acquired acoustic wavesignal to the server, receive the information of the acoustic wavesignal sent by the server; and determine the change in the distancebetween the receiving terminal and the transmitting terminal accordingto the information of the acoustic wave signal.

A working process of the system embodiment is: in a first step, afterthe pairing relationship is established between the receiving terminaland the transmitting terminal, the server 111 allocates a frequency bandof acoustic waves to the receiving terminal 112 and the transmittingterminal 113. In a second step, the transmitting terminal 113 sends theacoustic wave signal of the preset frequency to the receiving terminal112. In a third step, the receiving terminal 112 acquires the acousticwave signal of the preset frequency sent by the transmitting terminal113, and determines the change in the distance between the transmittingterminal 113 and the receiving terminal 112 according to the acquiredacoustic wave signal.

In addition, the receiving terminal 112 further sends the information ofthe received acoustic wave signal to the server 111. The server 111sends the information of the acoustic wave signal to the transmittingterminal 113. The transmitting terminal 113 receives information of theacoustic wave signal sent by the server 111, and determines the changein the distance between the receiving terminal 112 and the transmittingterminal 113 according to the information of the acoustic wave signal.

Beneficial effects obtained by applying the system embodiment providedin this application are the same as or similar to the beneficial effectsobtained by applying the foregoing method embodiment. To avoidrepetitions, details are not described herein again.

A person skilled in the art should understand that the embodiments ofthis application may be provided as methods, systems, or computerprogram products. Therefore, this application may take the form ofcomplete hardware embodiments, complete software embodiments, orembodiments combining software and hardware. In addition, thisapplication may use a form of a computer program product implemented onone or more computer available storage media including computeravailable program code (including but not limited to a magnetic diskstorage, a CD-ROM, an optical memory, and the like).

This application is described with reference to flowcharts and/or blockdiagrams of the method, the device (the system), and the computerprogram product in the embodiments of this application. It should beunderstood that computer program instructions may be used forimplementing each process and/or each block in the flowcharts and/or theblock diagrams and a combination of a process and/or a block in theflowcharts and/or the block diagrams. These computer programinstructions may be provided for a general-purpose computer, a dedicatedcomputer, an embedded processor, or a processor of any otherprogrammable data processing device to generate a machine, so that theinstructions executed by a computer or a processor of any otherprogrammable data processing device generate an apparatus forimplementing a function in one or more processes in the flowchartsand/or in one or more blocks in the block diagrams.

These computer program instructions may further be stored in a computerreadable memory that can guide the computer or any other programmabledata processing device to work in a specific manner, so that theinstructions stored in the computer readable memory generate an artifactthat includes an instruction apparatus. The instruction apparatusimplements a specified function in one or more processes in theflowcharts and/or in one or more blocks in the block diagrams.

These computer program instructions may alternatively be loaded onto acomputer or another programmable data processing device, so that aseries of operations and steps are performed on the computer or theanother programmable device, thereby generating computer-implementedprocessing. Therefore, the instructions executed on the computer or theanother programmable device provide steps for implementing a specificfunction in one or more processes in the flowcharts and/or in one ormore blocks in the block diagrams.

In a typical configuration, a computing device includes one or moreprocessors (CPUs), an input/output interface, a network interface, and amemory.

The memory may include forms such as a volatile memory in acomputer-readable medium, a random access memory (RAM), and/or anon-volatile memory, for example, a read-only memory (ROM) or a flashmemory (flash RAM). The memory is an example of the computer-readablemedium.

The computer-readable medium includes non-volatile, volatile, removable,and non-removable media that can store information by using any methodor technology. The information may be a computer-readable instruction, adata structure, a program module, or other data.

Examples of a storage medium of a computer includes, but are not limitedto, a phase-change memory (PRAM), a static random access memory (SRAM),a dynamic random access memory (DRAM), a random access memory (RAM) ofanother type, a read-only memory (ROM), an electrically erasableprogrammable read-only memory (EEPROM), a flash memory or another memorytechnology, a compact disc read-only memory (CD-ROM), a digitalversatile disc (DVD) or another optical storage, a magnetic cassettetape, a magnetic disk storage or another magnetic storage device oranother non-transmission medium, which can be used to store informationaccessed by the computer device. According to definitions in thisspecification, the computer-readable medium does not include atransitory media, for example, a modulated data signal and carrier.

It should be further noted that the terms “include,” “comprise,” or anyvariants thereof are intended to cover a non-exclusive inclusion.Therefore, a process, method, article, or device that includes a seriesof elements not only includes such elements, but also includes otherelements not specified expressly, or may include inherent elements ofthe process, method, article, or device. Unless otherwise specified, anelement limited by “include a/an . . . ” does not exclude other sameelements existing in the process, the method, the article, or the devicethat includes the element.

The foregoing descriptions are merely embodiments of this application,and are not intended to limit this application. For a person skilled inthe art, this application may have various modifications andalterations. Any alteration, equivalent change or modification madewithin the spirit and principle of this application shall fall withinthe scope of the claims of this application.

What is claimed is:
 1. A method for determining a change in a distance,comprising: sending, by a receiving terminal, a paring request to aserver for the server to forward the paring request to a transmittingterminal, and to allocate a frequency band for the receiving terminaland the transmitting terminal after the transmitting terminal acceptsthe paring request; acquiring, by the receiving terminal, an acousticwave signal of a frequency sent by the transmitting terminal, whereinthe frequency is determined by the transmitting terminal based on theallocated frequency band; determining, by the receiving terminal, achange in the acquired acoustic wave signal; and determining, by thereceiving terminal, a change in a distance between the transmittingterminal and the receiving terminal according to the change in theacquired acoustic wave signal.
 2. The method according to claim 1,wherein the determining a change in the acquired acoustic wave signalcomprises: determining a change in energy of the acquired acoustic wavesignal; and wherein the determining the change in the distance betweenthe transmitting terminal and the receiving terminal according to thechange in the acquired acoustic wave signal comprises: determining thechange in the distance between the transmitting terminal and thereceiving terminal according to the change in the energy of the acquiredacoustic wave signal.
 3. The method according to claim 1, wherein theacoustic wave signal of the frequency is selected by the transmittingterminal from acoustic waves corresponding to the frequency band.
 4. Themethod according to claim 1, wherein the frequency band is allocated tothe receiving terminal and the transmitting terminal when the serverdetermines that the distance between the receiving terminal and thetransmitting terminal is within the preset distance range.
 5. The methodaccording to claim 1, wherein another one or more frequency bands areallocated to the receiving terminal and the transmitting terminal by theserver and the acoustic wave signal of the frequency sent by thetransmitting terminal comprises acoustic waves of frequenciesrespectively corresponding to the two or more frequency bands that aresuperimposed together.
 6. The method according to claim 1, wherein afterthe determining a change in a distance between the transmitting terminaland the receiving terminal, the method further comprises: generatingprompt information according to the change in the distance for promptingthe change in the distance between the receiving terminal and thetransmitting terminal.
 7. The method according to claim 6, wherein afterthe generating prompt information according to the change in thedistance, the method further comprises: sending, by the receivingterminal, the prompt information to the transmitting terminal, to promptthe change in the distance between the receiving terminal and thetransmitting terminal.
 8. The method according to claim 6, wherein afterthe generating prompt information according to the change in thedistance, the method further comprises: sending, by the receivingterminal, through the server, the prompt information to the transmittingterminal, to prompt the change in the distance between the receivingterminal and the transmitting terminal.
 9. The method according to claim8, wherein a manner of prompting the change in the distance between thereceiving terminal and the transmitting terminal comprises at least oneof the following: prompting the change in the distance between thereceiving terminal and the transmitting terminal with a sound; promptingthe change in the distance between the receiving terminal and thetransmitting terminal with a picture; prompting the change in thedistance between the receiving terminal and the transmitting terminalwith an animation; and prompting the change in the distance between thereceiving terminal and the transmitting terminal with a vibration. 10.The method according to claim 9, wherein when the prompt informationprompts the change in the distance between the receiving terminal andthe transmitting terminal with a sound, before the generating promptinformation according to the change in the distance, the method furthercomprises: establishing a correspondence between a magnitude of energyof an acoustic wave signal and a volume of the sound of the promptinformation.
 11. A method for determining a change in a distance,comprising: receiving, by a transmitting terminal, a paring request sentby a receiving terminal through a server; accepting, by the transmittingterminal, the paring request; receiving, by the transmitting terminal, afrequency band allocated by the server; determining, by the transmittingterminal, an acoustic wave signal of a frequency based on the frequencyband allocated by the server; sending, by the transmitting terminal, theacoustic wave signal of the frequency to the receiving terminal;receiving, by the transmitting terminal, information of the acousticwave signal returned by the receiving terminal after acquiring theacoustic wave signal; determining, by the transmitting terminal, achange in the acoustic wave signal according to the information of theacoustic wave signal; and determining, by the transmitting terminal, achange in a distance between the receiving terminal and the transmittingterminal according to the change in the acoustic wave signal.
 12. Themethod according to claim 11, wherein the determining a change in theacoustic wave signal according to the information of the acoustic wavesignal comprises: determining a change in energy of the acoustic wavesignal according to the information of the acoustic wave signal; andwherein the determining the change in the distance between the receivingterminal and the transmitting terminal according to the change in theacoustic wave signal comprises: determining the change in the distancebetween the transmitting terminal and the receiving terminal accordingto the change in the energy of the acoustic wave signal.
 13. The methodaccording to claim 12, wherein the receiving, by the transmittingterminal, information of the acoustic wave signal returned by thereceiving terminal comprises: receiving, by the transmitting terminal,information on energy of the acoustic wave signal.
 14. An apparatus fordetermining a change in a distance, wherein the apparatus is located ina receiving terminal, comprising: one or more processors and one or morenon-transitory computer-readable memories coupled to the one or moreprocessors and configured with instructions executable by the one ormore processors to cause the apparatus to perform operations comprising:sending a paring request to a server for the server to forward theparing request to a transmitting terminal, and to allocate a frequencyband for the receiving terminal and the transmitting terminal after thetransmitting terminal accepts the paring request; acquiring the acousticwave signal of the frequency sent by the transmitting terminal, whereina frequency is determined by the transmitting terminal based on theallocated frequency band; determining a change in the acquired acousticwave signal; and determining a change in a distance between thetransmitting terminal and the receiving terminal according to the changein the acquired acoustic wave signal.
 15. The apparatus according toclaim 14, wherein the determining a change in the acquired acoustic wavesignal comprises: determining a change in energy of the acquiredacoustic wave signal; and wherein the determining the change in thedistance between the transmitting terminal and the receiving terminalaccording to the change in the acquired acoustic wave signal comprises:determining the change in the distance between the transmitting terminaland the receiving terminal according to the change in the energy of theacquired acoustic wave signal.
 16. The apparatus according to claim 14,wherein the acoustic wave signal of the frequency is selected by thetransmitting terminal from acoustic waves corresponding to the frequencyband.
 17. The apparatus according to claim 14, wherein the operationsfurther comprise: generating prompt information according to the changein the distance for prompting the change in the distance between thereceiving terminal and the transmitting terminal.
 18. The apparatusaccording to claim 17, wherein the operations further comprise: sendingthe prompt information to the transmitting terminal to prompt the changein the distance between the receiving terminal and the transmittingterminal.
 19. The apparatus according to claim 14, wherein the frequencyband is allocated to the receiving terminal and the transmittingterminal when the server determines that the distance between thereceiving terminal and the transmitting terminal is within the presetdistance range.
 20. The apparatus according to claim 14, wherein anotherone or more frequency bands are allocated to the receiving terminal andthe transmitting terminal by the server and the acoustic wave signal ofthe frequency sent by the transmitting terminal comprises acoustic wavesof frequencies respectively corresponding to the two or more frequencybands that are superimposed together.